package com.example.spring.multi.config;

import com.example.spring.multi.aop.annotation.aspect.MyLog;
import com.example.spring.multi.aop.service.MyAopService;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

/**
 * @author tomato
 * @ClassName MyConfig
 * @description:
 * @date 2023年07月09日 15:25
 * @version: 1.0
 */

//配置类
@Configuration
@EnableAspectJAutoProxy //开启Aop注解功能
public class MyConfig {

    //向容器中注册: 日子切面类
    @Bean
    public MyLog myLog(){
        return new MyLog();
    }

    //向容器中注册: 业务逻辑类
    @Bean
    public MyAopService myAopService(){
        return new MyAopService();
    }


}